package com.fbs.controller;

import com.fbs.service.ConfessionwallService;
import com.fbs.vo.Result;
import com.fbs.vo.WallVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("wall")
public class WallController {
    @Autowired
    private ConfessionwallService confessionwallService;
    @PostMapping("findAll")
    public Result findAll(){
        Result all = confessionwallService.findAll();
        System.out.println("all = " + all);
        return all;
    }
    @PostMapping("add")
    public Result addwall(@RequestBody WallVo wallVo){
        return confessionwallService.addwall(wallVo);
    }
}
